// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** addCarousel POST /api/carousel/add */
export async function addCarouselUsingPost(
  body: API.CarouselAddRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseLong_>('/api/carousel/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getBanners GET /api/carousel/banners */
export async function getBannersUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponseListCarouselVO_>('/api/carousel/banners', {
    method: 'GET',
    ...(options || {}),
  })
}

/** deleteCarousel POST /api/carousel/delete */
export async function deleteCarouselUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/carousel/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** getCarouselVOById GET /api/carousel/get/vo */
export async function getCarouselVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getCarouselVOByIdUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseCarouselVO_>('/api/carousel/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** listCarouselVOByPage POST /api/carousel/list/page/vo */
export async function listCarouselVoByPageUsingPost(
  body: API.CarouselQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageCarousel_>('/api/carousel/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** updateCarousel POST /api/carousel/update */
export async function updateCarouselUsingPost(
  body: API.CarouselUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/carousel/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
